package A1_3;

import java.util.List;

public class School {
    private String name;
    private String address;
    private List<Department> departmentList;//一个School由一到多个Department组成

    public School() {
    }

    public School(String name, String address, List<Department> departmentList) {
        this.name = name;
        this.address = address;
        this.departmentList = departmentList;
    }

    @Override
    public String toString() {
        return "学校{" +
                "学校名='" + name + '\'' +
                ", 地址='" + address + '\'' +
                ", 课程列表=" + departmentList +
                '}';
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public List<Department> getDepartmentList() {
        return departmentList;
    }

    public void setDepartmentList(List<Department> departmentList) {
        this.departmentList = departmentList;
    }
}
